package com.itcast.demo.validate.exception;

/**
 * @author SuQianLong
 */
public class CustomException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private final String errorCode;

    private final Object data;

    public CustomException(String message, String errorCode, Object data) {
        super(message);
        this.errorCode = errorCode;
        this.data = data;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public Object getData() {
        return data;
    }
}